﻿<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
  Id="CopyLinkToClipboardButton"
  Location="CommandUI.Ribbon"
  RegistrationType="List"
  RegistrationId="101">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition
        Location="Ribbon.Documents.Share.Controls._children">
          <Button Id="Ribbon.Documents.New.CopyLinkToClipboardButton"
                  Image16by16="/_layouts/$Resources:core,Language;/images/formatmap16x16.png" Image16by16Top="-96" Image16by16Left="-176"
                  Image32by32="/_layouts/$Resources:core,Language;/images/formatmap32x32.png" Image32by32Top="0" Image32by32Left="-448"
                  Description="Copy Document Links To Clipboard. Note: It only works with Internet Explorer."
                  LabelText="Copy Link To Clipboard"
                  ToolTipTitle="Copy Link To Clipboard"
                  ToolTipDescription="Copy Document Links To Clipboard. Note: It only works with Internet Explorer."
                  Alt="Copy Document Links To Clipboard"
                  Sequence="15"
                  Command="ClipboardButton"
                  TemplateAlias="o1" />
        </CommandUIDefinition>
      </CommandUIDefinitions>
      <CommandUIHandlers>
        <CommandUIHandler
            Command="ClipboardButton"
            CommandAction="javascript:copyLinkToClipboard('{SiteUrl}');"
            EnabledScript="javascript:enableCopyLinkToClipboard();"/>
      </CommandUIHandlers>
    </CommandUIExtension>
  </CustomAction>
  <CustomAction
   Id="CopyLinkToClipboardButton.Script"
   Location="ScriptLink"
   ScriptSrc ="/_layouts/CopyLinkToClipboard/CopyToClipboard.js"/>
  <CustomAction
   Id="JQuery.Script"
   Location="ScriptLink"
   ScriptSrc ="/_layouts/CopyLinkToClipboard/jquery-1.4.4.min.js"/>
</Elements>